<? 
$parentCode = $_lang=='vn'?'vn':'en';
$sqlParent = "select * from tbl_product_category where status=0 and parent=(select id from tbl_product_category where code='".$parentCode."') order by sort, date_added";
$resultParent = mysql_query($sqlParent,$conn);
?>
<div id="masterdiv">
<?
while($rowParent = mysql_fetch_assoc($resultParent)){?>
<tr>
<td class="menu" onmouseOver="this.className='menu1';" onmouseOut="this.className='menu';">
<div class="menutitle" onclick="SwitchMenu('sub1')" >
<a title="khohangtot| do gia dung" class="menu_link1" href="./?frame=text"><?=$rowParent["name"]?></a>
</div>
</td>
</tr>
<tr><td>

<span class="submenu" id="sub1">
<?
$sqlChild = "select * from tbl_product_category where status=0 and parent='".$rowParent['id']."' order by sort, date_added";
$resultChild = mysql_query($sqlChild,$conn);
while($rowChild = mysql_fetch_assoc($resultChild)){
?>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
              
				  <tr>
                  <td class="menu_cp1" onmouseOver="this.className='menu1_cp1';" onmouseOut="this.className='menu_cp1';">
				  <a title="khohangtot| do gia dung" href="./?frame=product&cat=<?=$rowChild['id']?>" class="menu_link1"><?=$rowChild["name"]?></a></td>
                </tr>
				
              </table>
	<? }?>
	</span></td></tr>
	<? }?></div>
						